package com.trana.demo;

public class demo4 {
	public static void main(String[] args) {
		Manger m=new Manger("nsadj",23,"sjdhsj",23456,233);
		m.show();
		m.showYearSal();		
	}

}

class Emp{
	String name;
	int age;
	String job;
	double salary;
	Emp(String name,int age,String job,double salary){
		this.name=name;
		this.age=age;
		this.salary=salary;
		this.job=job;	
	}
	Emp(){
		
	}
	void show(){
		System.out.println(name+","+age+","+job+","+salary+",");
	}
}

class Manger extends Emp{
	double comm;
	Manger(String name,int age,String job,double  salary,double comm){
		super(name,age,job,salary);  
		this.comm=comm;
	}
	void show(){
		System.out.println(name+","+age+","+job+","+salary+","+comm+",");
	}
	void showYearSal(){
	  double sum=0;
	  sum=salary*12+comm;
	  System.out.println("sum="+sum);
	}
}

